import 'package:flutter/material.dart';
import 'package:flutter_test_demo/static/colors/MyColors.dart';

class ProjectInfo extends StatelessWidget {
  final Map reInfo ;
  const ProjectInfo({Key key, @required this.reInfo}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("图书详情"), 
        backgroundColor: MyColor.titleColor,
        centerTitle: true,
      ),
      body: Column(
        children: <Widget>[
          Container(
            width: double.infinity,
            height: 200.0,
            child: Image.asset(
              this.reInfo['image'],
              fit: BoxFit.fitWidth,
              alignment:Alignment.center
            ),
          ),
          // 名称
          ListTile(
            title: Text(
              this.reInfo["name"],
              style: TextStyle(
                height: 1.5,
                fontSize: 16.0
              ),
            ),
            leading: Text(
              "名称：",
              style: TextStyle(
                height: 1.5,
                color: MyColor.titleColor,
                fontWeight: FontWeight.w500,
                fontSize: 16.0
              ),
            ),
            
          ),
          // 年龄：
          ListTile(
            title: Text(
              this.reInfo["money"] ?? "0",
              style: TextStyle(
                height: 1.5,
                fontSize: 16.0
              ),
            ),
            leading: Text(
              "金额：",
              style: TextStyle(
                height: 1.5,
                color: MyColor.titleColor,
                fontWeight: FontWeight.w500,
                fontSize: 16.0
              ),
            ),
          ),
          // 描述：
          ListTile(
            title: Text(
              this.reInfo["des"],
              style: TextStyle(
                height: 1.5,
                fontSize: 16.0
              ),
            ),
            leading: Text(
              "描述：",
              style: TextStyle(
                height: 1.5,
                color: MyColor.titleColor,
                fontWeight: FontWeight.w500,
                fontSize: 16.0
              ),
            ),
          ),
        ],
      ),
    );
  }
}